#ifndef DEPARTLIST_H
#define DEPARTLIST_H

#include <QWidget>
#include <QTreeWidgetItem>
#include "cadreinfotab.h"
#include <QBrush>

namespace Ui {
class DepartList;
}

class DepartList : public QWidget
{
    Q_OBJECT

public:
    explicit DepartList(QWidget *parent = 0);
    ~DepartList();
    void initTree(QString currentPerson = QString());
    QHash<QString,QString> cadreHash;


private slots:
    void on_treeWidget_itemClicked(QTreeWidgetItem *item, int column);

private:
    Ui::DepartList *ui;
    void getChild(QTreeWidgetItem *item,int id,QString currentperson=QString());
    void getCadre(QTreeWidgetItem *item,int id,QString currentperson=QString());
    void parentExpand(QTreeWidgetItem *item);
};

#endif // DEPARTLIST_H
